package com.example.demo1.inquiry.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * Created by zlz on 2018/6/30.
 */
@Data
public class InquiryAddVo {

      @Id
      @GeneratedValue
    private Integer id;
    //询价单号
    private String inquiryNo;
    private String inquiryMan;

    @NotNull(message="新增失败,法人信息不能为空")
    private Integer legalPersonId;
    @NotNull(message="新增失败,询价类型不能为空")
    private Integer type;
    @NotNull(message="新增失败,询价币别不能为空")
    private Integer moneyType;
    @NotNull(message="新增失败,金额是否含税不能为空")
    private Integer isTax;
//    @NotNull(message="新增失败,询价开始日期不能为空")
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private Date startDate;
//    @NotNull(message="新增失败,询价结束日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private Date endDate;
    //备件集合
    @Valid
    //@NotEmpty(message="新增失败,备件集合不能为空")
    List<InquiryPartsVo> partsListVo;
    //供应商集合
    @Valid
    //@NotEmpty(message="新增失败,供应商集合不能为空")
    List<InquirySupplierVo> supplierListVo;
}
